<!DOCTYPE html>
<!-- 通过 xmlns:th=”http://www.thymeleaf.org“ 命令空间，将静态页面转换为动态的视图，
需要进行动态处理的元素,将使用“th:”前缀。 -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Insert title here</title>

</head>
<body th:fragment="head-logo">


<!--页眉-用户登录/注册-->
<div class="header">

    <p th:if="${session.user==null }">
        <span>高校排行</span> 请<a th:href="@{/toLogonRegister }"> 登录账号 </a> 或<a th:href="@{/toLogonRegister}"> 注册会员</a>
    </p>


    <p th:if="${session.user!=null }">
        <span>Hi,</span> <a th:href="@{/toMemberInfo }" style="color: blue">[[ ${session.user.userName } ]]</a> 您是普通会员,拥有<span
            style="color: red"> [[ ${session.user.userCode } ]]</span>积分。
        【<a th:href="@{/toMemberInfo(flag=4) }"> 欣赏记录</a>】【<a th:href="@{/logout}"> 退出</a>】
    </p>

    <div class="line"></div>
</div>
<!--LOGO区域-->
<div class="logo">

    <div class="logo-img"></div>
    <div class="search">
        <div class="form-group has-success has-feedback">
            <input type="text" class="form-control search-novel" placeholder="请输入校民或校长">
            <span class="glyphicon glyphicon-search form-control-feedback"></span>
        </div>
    </div>
</div>

<script type="text/javascript">
    $(function () {
        $(".search-novel").keyup(function () {
            if (event.keyCode == 13) {
                //获取搜索关键字
                var searchKey = $(".search-novel").val();
                window.location.href = "seachNovle?searchKey=" + searchKey;
            }
        })
    })
</script>

</body>
</html>

